-- UNITDEF -- kawnfire_iii --
--------------------------------------------------------------------------------

local unitName = "kawnfire_iii"

--------------------------------------------------------------------------------

local unitDef = {
  acceleration       = 0.5,
  brakeRate          = 0.5,
  buildCostMetal     = 10,
  canAttack          = true,
  canMove            = true,
  canstop            = 1,
  category           = [[PAWN UNARMORED UNIT TARGET]],
  collisionvolumetest = 1,
  corpse              = [[DEAD]],
  description        = [[Support Lv 3]],
  energyMake         = 0,
  energyStorage      = 0,
  explodeAs          = [[Death]],
  footprintX         = 2,
  footprintZ         = 2,
  iconType           = [[pawn]],
  idleAutoHeal       = 50,
  idleTime           = 300,
  levelGround        = false,
  maxDamage          = 338,
  maxVelocity        = 1,
  metalMake          = 0,
  metalStorage       = 0,
  movementClass      = [[medium]],
  name               = [[Gumiho Mobile Cannon]], ----K: korean fox demon
  noChaseCategory    = [[NOTARGET]],
  objectName         = [[kawnfire_iii.s3o]],
  radarDistance      = 0,
  reclaimable        = false,
  seismicSignature   = 1,
  selfDestructAs     = [[Death]],
  selfDestructCountdown = 1,
  showNanoFrame      = false,
  sightDistance      = 800,
  smoothAnim         = false,
  turnRate           = 1000,
  unitname           = [[kawnfire_iii]],
  upright            = false,
  sfxtypes = {
    explosiongenerators = {
[[custom:flashmuzzle1]],
[[custom:burning]], 
 },
  },
  -- sounds = {
    -- arrived = {
      -- [[commandgiven]],
    -- },
    -- ok = {
      -- [[commandgiven]],
    -- },
    -- select = {
      -- [[select]],
    -- },
  -- },
  weapons = {
       [1]  = {
      badTargetCategory  = [[ARMORED]],
      def                = [[fiiiwep1]],
      onlyTargetCategory = [[TARGET]],
    },
  },
}


--------------------------------------------------------------------------------

local weaponDefs = {
  fiiiwep1 = {
	name = [[Rail Cannon]],
	id = 3,
	RenderType = 1,
	LineOfSight = 1,
	Turret = 1,
	collideFriendly     =  false,
	--accuracy = 3200, doesnt work on los
	Range = 968,
	AreaOfEffect = 5,
	ReloadTime = 3,
	WeaponVelocity = 1200,  --originally 800
	Tolerance = 1000,
	FireStarter = 25,
	--cegTag = [[Railgun]],	
	soundstart = [[railgun]], --need brackets by sound
	soundhit = [[bigexplo]],
	explosiongenerator = [[custom:SMALLMISSILE_EXPLOSION]], 
	impulsefactor = 0,
	impulseBoost = 0,
	craterMult = 0,
	craterBoost = 0,
	startsmoke = 1,
	InterceptedByShieldType = 2,

        damage = {
      default            = 135,
    },
  },
  }
unitDef.weaponDefs = weaponDefs

local featureDefs = {
    DEAD  = {
      description      = [[Wreckage - pawn]],
      blocking         = true,
      category         = [[corpses]],
      damage           = 1000,
      energy           = 0,
	  featureDead      = [[HEAP]],
      featurereclamate = [[SMUDGE01]],
      footprintX       = 2,
      footprintZ       = 2,
      height           = [[20]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[kawnfire_iii_dead.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      world            = [[All Worlds]],
    },
	
	 HEAP  = {
      description      = [[Debris - pawn]],
      blocking         = true,
      category         = [[heaps]],
      damage           = 500,
      energy           = 0,
      featurereclamate = [[SMUDGE01]],
      footprintX       = 2,
      footprintZ       = 2,
      height           = [[4]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[truck_heap.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      seqnamereclamate = [[TREE1RECLAMATE]],
      world            = [[All Worlds]],
    },
  }
  unitDef.featureDefs = featureDefs

--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
